<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<LINK href="<?=$this->styleurl?>/images/index.css" type=text/css rel=stylesheet />
</head>
<body>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 CALLPADDING="0">
              <TBODY>
			     <TR BORDER="0" WIDTH="100%">
                <TD style="PADDING-LEFT: 8px; PADDING-TOP: 8px" vAlign=top 
                align=left bgColor=#ffffff height=30 colspan="4">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="84%" height="20"><img src="<?=$this->styleurl?>/images/url_01.gif" width="7" height="10" />&nbsp;<strong>专题列表</strong></td>
                    <td width="16%" height="20"><div align="center"><a href="zt_w.php">添加</a></div></td>
                  </tr>
                </table>				 </TD>
              </TR>
			  <form id="form2" name="form2" method="post" action="zt_w.php">
			  <tr>
                    <td height="20" bgcolor="#999999" style="PADDING-LEFT: 8px; PADDING-TOP: 8px"><input type="checkbox" name="selall" title="全选"  onClick="select_all('form2','ChkKindId[]',this.name)">&nbsp;</td>
                    <td width="20%" bgcolor="#999999" style="PADDING-LEFT: 8px; PADDING-TOP: 8px"><span class="STYLE1">id</span></td>
                    <td bgcolor="#999999" class="STYLE1">名称</td>
                    <td bgcolor="#999999"><div align="center">操作</div></td>
			  </tr>
			  <?php 
			  foreach ($this->topic_list as $row):	
			 ?>
              <TR BORDER="0" WIDTH="100%" bgcolor="#EEEEEE" onmousemove="this.style.color='#000000';this.style.backgroundColor='#D5D5D5'" onmouseout="this.style.backgroundColor='#EEEEEE';this.style.color='#000000'">
                <TD width="6%"  height=25 align=left vAlign=top style="PADDING-LEFT: 8px; PADDING-TOP: 8px; border-bottom:#666666 dotted 1px;"><input name="ChkKindId[]" type="checkbox" id="ChkKindId[]" value=""  /></TD>
                <TD width="20%"  height=25 align=left vAlign=top style="PADDING-LEFT: 8px; PADDING-TOP: 8px; border-bottom:#666666 dotted 1px;"><?=$row["top_id"]?></TD>
                <TD align=left vAlign=top style="PADDING-LEFT: 8px; PADDING-TOP: 8px;border-bottom:#666666 dotted 1px;"><?=$row["top_name"]?></TD>
                <TD width="16%" align=left vAlign=top style="PADDING-LEFT: 8px; PADDING-TOP: 8px;border-bottom:#666666 dotted 1px;"><div align="center"><a href="">更改</a> <a href="#"></a> </div></TD>
              </TR>
              <?php 
              endforeach;
              ?>
			<TR BORDER="0" WIDTH="100%">
              <TD height="30"  colspan="4">&nbsp;&nbsp;
                <input type="image" src="<?=$this->styleurl?>/images/del.gif" align="absmiddle" border="0" name="del" onclick="javascript:chkform(form2.name,'确定刪除吗,一般情况请不要删除哦？','del');" />
		                      <input name="action" type="hidden" id="action" />
		                      &nbsp;&nbsp;&nbsp;</TD>
			</TR>
		  </form>
<TR BORDER="0" WIDTH="100%">
			  <TD height="30"  colspan="7"></TD>
			  </TR>
      </TABLE>
</body>
</html>
<script language="JavaScript" >

function chkform(theForm,msg,action){
	if (confirm(msg)){

		document.forms[theForm].action.value = action;
		document.forms[theForm].submit();
		return true;
	}else{
		return false;
	}
}

// -------- 全選或取消 checkbox 方塊
<!--
function select_all(formName, elementName, selectAllName) {
	if(document.forms[formName].elements[selectAllName].checked) {
		
		if(document.forms[formName].elements[selectAllName].length = 1 &&
		    typeof(document.forms[formName].elements[elementName]) != "undefined" ) {
		
			document.forms[formName].elements[elementName].checked = true;

		    for(var i = 0; i < document.forms[formName].elements[elementName].length; i++)
			document.forms[formName].elements[elementName][i].checked = true;
		}
	}
	else {
		if(document.forms[formName].elements[selectAllName].length = 1 &&
		    typeof(document.forms[formName].elements[elementName]) != "undefined" ) {
			document.forms[formName].elements[elementName].checked = false;

		    for(var i = 0; i < document.forms[formName].elements[elementName].length; i++)
				document.forms[formName].elements[elementName][i].checked = false;
		}
	}
}
//-->

</script>